﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace Systemudvikling___Larman_Projekt___06._02._2012_
{
    public class ProductCatalog
    {
        ArrayList descriptions = new ArrayList();

        public ProductCatalog()
        {
            // Sample data
            int id1 = 100;
            int id2 = 200;
            double price = 3;

            ProductDescription desc = new ProductDescription(id1, price, "product 1");
            descriptions.Add(desc);
            desc = new ProductDescription(id2, price, "product 2");
            descriptions.Add(desc);
        }
         public ProductDescription getProductDescription(int id) 
         {
             foreach (ProductDescription product in descriptions)
             {
                 if (product.getItemID() == id)
                 {
                     return product;
                 }

             }
             return null;
         }
    }
}
